from  flask import Flask

#获取服务器
app = Flask(__name__)

# 开发一个登录接口
def login():
    return "登陆成功"

def home():
    return {'code':200,'msg':'welcome to beijing...'}

#添加url
app.add_url_rule('/login',view_func=login)
app.add_url_rule("/", view_func=home)
app.run()